const app = getApp();
const req = require("../../utils/http.js");
Page({


  data: {

  },

  onLoad: function (options) {
    let t = this
    let productId = options.productId
    t.setData({
      productId,
    })
    t.getMerchantList(productId);
  },

  getMerchantList(productId){
    let t = this;
    let params = {productId}
    req.wxReq('/coupon/wxProduct/getUseStore',"GET",params).then(res=>{
      if(res.data.code==200){
        t.setData({
          merchantList:res.data.result
        })
      }else{
        wx.showToast({
          title: res.data.message,
          icon:'none',
          duration:1500
        })
      }
    })
  },

  //拨打电话12
  handleTel: function (e) {
    wx.makePhoneCall({
      phoneNumber: e.currentTarget.dataset.phone
    })
  },


})
